<?php

class Admin_LoginController extends Zend_Controller_Action {

    public function indexAction() {
        
    }

    public function checkAction() {

        $login = (string) $this->_getParam('login');
        $password = (string) $this->_getParam('password');

        $error = null;
        if ($this->_helper->auth->tryAuthenticate($login, $password, $error)) {
            $this->_helper->json('ok');
        } else {
            $this->_helper->json(array('error' => $error));
        }
    }

}
